home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / cli / AKCC.lha / Programmers / Examples / WildCmp.c < prev    next >
C/C++ Source or Header  |  2002-06-27  |  1KB  |  50 lines

  1. /*
  2. **      $VER: AssignName 37.1 (6.9.96)
  3. **
  4. **      Demonstrates usage of AKCC_WildCmp()
  5. **
  6. **      (C) Copyright 1989-96 Andreas R. Kleinert
  7. **      All Rights Reserved.
  8. */
  9.  
  10.  
  11. #define __USE_SYSBASE
  12.  
  13. #include <akccplus/akccplus_all.h>
  14. #include <proto/akccplus.h>
  15.  
  16. #include <stdlib.h>
  17.  
  18. #include <proto/exec.h>
  19. #include <proto/dos.h>
  20.  
  21.  
  22. struct AKCCPlusBase *AKCCPlusBase = N;
  23.  
  24. void main(long argc, char **argv)
  25. {
  26.  printf("\nWildCmp V37.1, FREEWARE, (c) 1993-96 by Andreas R. Kleinert.\n");
  27.  
  28.  AKCCPlusBase = (struct AKCCPlusBase *) OpenLibrary("akccplus.library", 37);
  29.  if(AKCCPlusBase)
  30.   {
  31.    char wild_string[256], orig_string[256];
  32.  
  33.    printf("\nEnter a WildCard string :");
  34.    scanf("%s", wild_string);
  35.  
  36.    printf("Enter string to compare with the WildCard string :");
  37.    scanf("%s", orig_string);
  38.  
  39.    if(AKCC_WildCmp(orig_string, wild_string)==TRUE) printf("\nThe pattern fits.\n");
  40.     else                                            printf("\nThe pattern does not match.\n");
  41.  
  42.    CloseLibrary((APTR) AKCCPlusBase);
  43.   }else
  44.   {
  45.    printf("\n Can't open \42akccplus.library\42 V37+ !\n");
  46.   }
  47.  
  48.  exit(0);
  49. }
  50.